Skip to content

Birmingham | ITP-Jan | Roman Sanaye | Sprint 1 | Sprint 1 Exercises#996

Open
RomanSanaye wants to merge 12 commits intoCodeYourFuture:mainfrom
RomanSanaye:Sprint-1-Exercises
Open

Birmingham | ITP-Jan | Roman Sanaye | Sprint 1 | Sprint 1 Exercises#996
RomanSanaye wants to merge 12 commits intoCodeYourFuture:mainfrom
RomanSanaye:Sprint-1-Exercises

Conversation

@RomanSanaye
Copy link

@RomanSanaye RomanSanaye commented Mar 11, 2026

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

This pull request includes my solutions for the Sprint 1 exercises in the Module Data-Groups.

I implemented the finalFrequency function which calculates the resulting frequency after applying all frequency changes from the input list.

The function processes the input numbers and computes the final frequency using JavaScript.

Questions

Is my implementation clear and readable, or would you suggest any improvements to the logic or structure?

@RomanSanaye RomanSanaye added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 11, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 11, 2026
@github-actions

This comment has been minimized.

8 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@RomanSanaye RomanSanaye changed the title Birmingham | ITP-Jan | Roman Sanaye | Module-Data-Groups | Sprint 1-Exercises Birmingham | ITP-Jan | Roman Sanaye | Sprint 1 | Sprint 1 Exercises Mar 11, 2026
@RomanSanaye RomanSanaye added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 13, 2026
@Poonam-raj Poonam-raj added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 18, 2026
@RomanSanaye RomanSanaye added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 19, 2026
Copy link

@Poonam-raj Poonam-raj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work with a few things I'd like to see corrected before approving this work.

common themes that need improving include

  1. variables being let vs const - which variables can be made stricter without breaking the code?
  2. leaving in commented code

I also spotted a few areas where tests were not accurate to the behaviours expected.

@Poonam-raj Poonam-raj added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Mar 20, 2026
@RomanSanaye RomanSanaye added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 22, 2026
@Poonam-raj Poonam-raj added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 23, 2026
Copy link

@Poonam-raj Poonam-raj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally you have addressed my points but some slight inaccuracies. Please make the final amendments and then we are done :D

@Poonam-raj Poonam-raj added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Mar 23, 2026
Comment on lines +40 to +43
test("decimal number should return the correct total", () => {
let elements = [1, 2.3, 4.5, 6];
expect(sum(elements)).toEqual(13.8);
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good work!

Comment on lines +56 to +59
test("non-number values should return Zero", () => {
let elements = ["a", "d", "hi"];
expect(sum(elements)).toEqual(0);
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely work

@Poonam-raj Poonam-raj added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants